package thread;

import java.util.Scanner;

public class SleepDemo
{
    public static void main(String[] args)
    {
        System.out.println("start");
        System.out.println("input a number");
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        for (int i = num ; i > 0 ; i--)
        {
            try
            {
                Thread.sleep(1000);
                System.out.println(i);
            } catch (InterruptedException e)
            {
                e.printStackTrace();
            }
        }

        System.out.println("end");
    }
}
